package com.untilov.gb.http.cookies;

import java.util.Vector;

import javax.microedition.io.HttpsConnection;

public class CookiesManagerMEImpl extends AbstractCookiesManager {

    public void processCookies(Object connection) throws Exception {
        HttpsConnection cConnection = (HttpsConnection) connection;
        setCookies(new Vector());
        int i = 1;
        String headerKey;
        while ((headerKey = cConnection.getHeaderFieldKey(i)) != null) {
            if (headerKey.equalsIgnoreCase("Set-Cookie")) {
                getCookies().addElement(cConnection.getHeaderField(i));
            }
            i++;
        }
    }
}